import { Module, ValidationPipe } from '@nestjs/common';
import { APP_PIPE } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CommentModule } from 'lib/comment';
import { Villager } from 'libs/db/entity/villager.entity';
import { VillagerController } from './Villager.controller';
import { VillagerService } from './Villager.service';
import { AuthService, AuthModule } from 'libs/auth';
import { User } from 'libs/db/entity/user.entity';

@Module({
    imports: [
        CommentModule,
        TypeOrmModule.forFeature([Villager]),
        AuthModule,
    ],
    controllers: [
        VillagerController
    ],
    providers: [
        VillagerService,
        {
            provide: APP_PIPE,
            useClass: ValidationPipe
        }
    ],
})
export class VillagerModule { }
